package models

// Article 文章表
type Article struct {
	BaseModel
	Title      string   `gorm:"type:varchar(100)" json:"title,omitempty"`
	CategoryId int      `gorm:"type:int" json:"category_id"`
	Category   Category `gorm:"foreignkey:ID;references:category_id" json:"category"`
	Url        string   `gorm:"type:varchar(255)" json:"url"`
}

// Category 分类表
type Category struct {
	ArtBaseModel
	Name  string `gorm:"type:varchar(100)" json:"name"`
	Count int    `gorm:"type:int(11)" json:"count"`
}

// Users 用户表
type Users struct {
	BaseModel
	UserName string `gorm:"type:varchar(100)" json:"user_name,omitempty"`
	PassWord string `gorm:"type:varchar(255)" json:"pass_word"`
	Status   int    `gorm:"default:0" json:"status"`
}
